<?php 

define('APP_TIMEZONE','Asia/Ho_Chi_Minh');
define('SITE_NAME','Lotus Ocean');
define('SLOGAN','We build apps for better life experience');
define('SUPPORT_EMAIL','wtest135@gmail.com');
define('SITE_URL',''); 
define('ADMINISTRATOR_URL', SITE_URL . '/administrator');
define('USER_SALT','lgcms');

define('MEDIA_URL', SITE_URL . '/media');
define('GALLERY_URL', MEDIA_URL . '/gallery');
define('FILE_URL', MEDIA_URL . '/files');
define('MAIN_MENU_ID', 301);
define('CATEGORY_NEWS_ID', 562);
/*
 * WARNING: Please don't change this
 */
class AuthorizationType {
    const ROLE = 2;
    const TASK = 1;
    const OPERATION = 0;
}
class MsgType {
    const SUCCESS = 'success';
    const ERROR = 'error';
    const WARNING = 'warning';
}
class ActionType {
    const SUBMIT = 'submit';
    const SAVE = 'save';
    const SAVE_CLOSE = 'saveclose';
    const SAVE_NEW = 'savenew';
    const CANCEL = 'cancel';
    const SAVE_CREATE_ADVANCE = 'savecreateadvance';
}
class MediaType {
    const ROOT = 'root';
    const IMAGE = 'image';
    const LESSON = 'lesson';
}

class Roles {
    const SUPER_ADMIN = 'Super Administration';
    const ADMINISTRATOR = 'Administrator';
    const MANAGER = 'Manager';
    const EDITOR = 'Editor';
    const SUBMITTER = 'Submitter';
    const TRANSLATOR = 'Translator';
}

class ProfileLanguage {
    const VN = 'VN';
    const JP = 'JP';    
}

class ProfileStatus {
    const STATUS_NEW = 'NEW';
    const STATUS_WAITING = 'WAITING';
    const STATUS_WAITING_FOR_RETRANSLATE = 'WAITING_FOR_RETRANSLATE';
    const STATUS_TRANSLATING = 'TRANSLATING';
    const STATUS_TRANSLATED = 'TRANSLATED';
    const STATUS_REJECTED = 'REJECTED';
    const STATUS_ACCEPTED = 'ACCEPTED';
    const STATUS_PASS = 'PASS';
    const STATUS_STAY = 'STAY';
    const STATUS_FLY = 'FLY';
    const STATUS_COMPLETE = 'COMPLETE';
    const STATUS_OUT = 'OUT';
}

class DataType{
    const INTEGER = 1;
    const FLOAT = 2;
    const STRING = 3;
    const DATETIME = 4;
    const BOOLEAN = 5;
}
class DataTypeString{
    const STRING = 'String';
    const INTEGER = 'Integer';
    const FLOAT = 'Float';
    const BOOLEAN = 'Boolean';
    const DATETIME = 'Datetime';
}
class ControlType{
    const TEXTBOX = 1;
    const CHECKBOX = 2;
    const RADIOBUTTON = 3;
    const TEXTAREA = 4;
    const COMBOBOX = 5;
    const DATE_PICKER = 6;
    const EDITOR_BASIC = 7;
    const EDITOR_ADVANCED = 8;
    const SELECT_USER = 9;
}
class ControlTypeString{
    const TEXTBOX = 'Text Box';
    const CHECKBOX = 'Check Box';
    const RADIOBUTTON = 'Radio Button';
    const TEXTAREA = 'Text Area';
    const COMBOBOX = 'Combobox';
    const DATE_PICKER = 'Date Picker';
    const EDITOR_BASIC = 'Editor (Basic)';
    const EDITOR_ADVANCED = 'Editor (Advanced)';
    const SELECT_USER = 'Select User';
}
class FieldVisibility{
    const VISIBLE = 1;
    const INVISIBLE = 0;
}
class CustomField{
    const YES = 1;
    const NO = 0;
}

/*
 * Common Constant
 */
class LGConstant {    
    
    //Constant for auth item type
    const AUTH_ITEM_ROLE = 2;
    
    //Constant for users
    const USER_STATUS_ACTIVE=1;
    const USER_STATUS_NOT_ACTIVE=100;
    
    //Constant for date format
    const DATE_FORMAT = 'd-M-y H:i'; //sample : 06-Sep-12 00:00
    const DATE_FORMAT_NOT_TIME = 'd-M-y'; //sample : 06-Sep-12
    const DATE_FORMAT_NOT_TIME_MONTH_NUMBER = 'd-m-Y'; //sample : 2006-09-12
    const DATE_DEFAULT = '01-Jan-70 07:00';
    //This constant to format the created date (eg. $currentdate) before saving to database
    const DATE_FORMAT_FOR_DATABASE = 'Y-m-d H:i:s'; //sample 2012/09/06 00:00:00
    const DATE_BIRTH_FORMAT_FOR_DATABASE = 'Y-m-d'; //sample 2012/09/06
    const DATE_FORMAT_BEGIN_FOR_DATABASE ='0000-00-00 00:00:00';
    const DATE_FORMAT_FOR_EXPORT = 'YmdHis'; //sample 20120906000000
    //constant for status
    const PUBLISH_STATUS = 1;
    const UNPUBLISH_STATUS = 0;
    const TRASHED_STATUS = 2;
    
    //constant for FEATURED
    const YES_FEATURED = 1;
    const NO_FEATURED = 0;
    
    //constant for checkout article 
    const CHECK_OUT = 1;
    const UNCHECK_OUT = 0;
    
    //constant for Comment
    const CAN_COMMENT = 1;
    const CAN_NOT_COMMENT = 0;
    
    const COMMENT_STATUS_NEW = 0;
    const COMMENT_STATUS_APPROVED = 1;
    const COMMENT_STATUS_REJECTED = 2;
    
    //constant for robots
    const INDEX_FOLLOW = 'index, follow';
    const NOINDEX_FOLLOW = 'noindex, follow';
    const INDEX_NOFOLLOW = 'index, nofollow';
    const NOINDEX_NOFOLLOW = 'noindex, nofollow';
    
    //constant for access
    const ACCESS_PUBLIC = 'Public';
    const ACESS_REGISTERED = 'Registered';
    
    //constant send email
    const EMAIL_SENT = '1';
    const EMAIL_NOT_SENT = '0';
    
     //constant send download
    const DOWNLOADED = '1';
    const NOT_DOWNLOADED = '0';
    
    //constant for target window
    const TARGET_WIN_PARENT = '1';
    const TARGET_WIN_WITH_NAVIGATION = '2';
    const TARGET_WIN_WITHOUT_NAVIGATION = '3';
    
    //constant for default page
    const DEFAULT_PAGE_YES = '1';
    const DEFAULT_PAGE_NO = '0';
    
    //constant for activation status 
    const ACTIVATION_STATUS_YES = '1';
    const ACTIVATION_STATUS_NO = '0';
    
    //constant for default language
    const DEFAULT_LANGUAGE = 'en';
    
    const ACTION_UP = 'up';
    const ACTION_DOWN = 'down';
    
    //'Extension' constact detects Menu in Category table
    const CATEGORY_EXTENSION_OF_MENU = 'menu';
    
    //Constant for [Extension.view]
    const EXTENSION_VIEW_SINGLE_ARTICLE = 'article';
    const EXTENSION_VIEW_CATEGORY_BLOG = 'blog';
    const EXTENSION_VIEW_EXTERNAL_LINK = 'link';
    const EXTENSION_VIEW_GALLERY = 'gallery';
    const EXTENSION_VIEW_GALLERY_ITEM = 'gallery-item';
    //Const for Read more horizontal line in comment text
    const ARTICLE_READ_MORE_LINE = '<hr id="system-readmore" style="color: red" />';
    const ARTICLE_READ_MORE_LINE_IE9 = '<hr id="system-readmore" style="color: red;" />';
    
    //Constant for default extension
    const DEFAULT_CATEGORY_EXTENSION = 'content';
    const DEFAULT_MENU_EXTENSION = 'content';
    
    //Constant for Frontend Gallery
    const FRONTEND_GALLERY_IMAGE_WIDTH = 130;
    const FRONTEND_GALLERY_IMAGE_HEIGHT = 100;
    const FRONTEND_GALLERY_PHOTO_PAGE_SIZE = 16;
    const FRONTEND_GALLERY_NO_PHOTO = 'no_image.jpg';
    
    //Constant for Frontend Search
    const FRONTEND_SEARCH_PAGE_SIZE = 20;
    const FRONTEND_SEARCH_DISPLAYED_WORD = 50;
    
    //constant for is_deleted client 
    const DELETED = 1;
    const UNDELETED = 0;
    //constant for note request
    const REQUEST_INTERNAL_NOTE = 1;
    const REQUEST_STATUS_NOTE = 2;
    const REQUEST_COMMENT = 3;
    
    const REQUEST_NOTE_INTERNAL_NOTE = 'Internal notes';
    const REQUEST_NOTE_STATUS_NOTE = 'Status notes';
    const REQUEST_NOTE_COMMENT = 'Comments';
    
    const REQUEST_STATUS_CLOSED = 'Closed';
    const REQUEST_STATUS_COMPLETED = 'Completed';
    const REQUEST_STATUS_BLOCKED = 'Blocked';
    const REQUEST_STATUS_PENDING = 'Pending';
    
    const ISSUE_STATUS_CLOSED = 'Closed';
    
    const PAGE_SIZE = 10;
    
    //constant for activation status 
    const SEX_FEMALE = '0';
    const SEX_MALE = '1';
    const YES = '1';
    const NO = '0';
}

/***
 * The constants of this class are be mapped cms_extension database 
 */
class LGConstantExtensionType {
    const CONTACT_US = 1;
    const CATEGORY_BLOG = 2;
    const SINGLE_ARTICLE = 3;
    const EXTERNAL_LINK = 4;
    const GALLERY   = 5;
    const GALLERY_ITEM = 6;
    const SIGN_UP = 7;
    const FILE = 8;
}

class LGConstantTargetWindowType {
    const PARENT = 1;
    const NEW_WINDOW_WITH_NAVIGATION = 2;
    const NEW_WINDOW_WITH_NO_NAVIGATION = 3;
}

class LGConstantArticleStatus {
    const PUBLISHED = 1;
    const UNPUBLISHED = 0;
    const TRASHED = 2;
}

class LGConstantWidgetType {
    const BANNER = 'Banner';
    const TAB = 'Tab';
    const CUSTOM_HTML = 'Custom HTML';
}

class LGConstantUserRole {
    const GENERAL_SECRETARY = 'General Secretary';
    const MEMBERSHIP_DIRECTOR = 'Membership Director';
    const REGISTER = 'Member';
    const VICE_PRESIDENT = 'Vice President';
    const TREASURER = 'Treasurer';
    const BOARD_OF_DIRECTOR = 'Board of Director';
    const ADMIN = 'Admin';
    const SUPER_ADMIN = 'Super Administration';
    const PRESIDENT = 'President';
}

class LGConstantFileAuthItemName {
    const UPLOAD_FILE = 'File.UploadFile';
    const DELETE_FILE = 'File.Delete';
    const UPDATE_FILE = 'File.Update';
    const VIEW_ALL_FILES = 'File.ViewAllFile';
    const INDEX = 'File.Index';
}